import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useHeroStore = defineStore('hero', () => {

    const heroList= ref<Hero.Item[]>([])
    const heroVer = ref<Number>()
    function setHeroList(list:Hero.Item[]){
        heroList.value = list
    }
    function setHeroVer(ver:number){
        heroVer.value
    }
    function getHeroList(){
        if(heroList.value.length==0){

        }
        return heroList.value;
    }
    return {heroList,heroVer,setHeroList,setHeroVer}
},{
    persist: true,
})
